package com.center.biz.impl;

import com.center.api.model.EduTeacher;
import com.center.api.remote.RemoteEduTeacherService;
import com.center.biz.dao.EduTeacherMapper;
import org.apache.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

@Service(version = "1.0",interfaceClass = RemoteEduTeacherService.class)
public class RemoteEduTeacherServiceImpl implements RemoteEduTeacherService{

    @Autowired
    private EduTeacherMapper eduTeacherMapper;

    @Override
    public int save(EduTeacher eduTeacher) {
        return eduTeacherMapper.insertSelective(eduTeacher);
    }

    @Override
    public int update(EduTeacher eduTeacher) {
        return eduTeacherMapper.updateByPrimaryKeySelective(eduTeacher);
    }

    @Override
    public int delete(int id) {
        return eduTeacherMapper.deleteByPrimaryKey(id);
    }

    @Override
    public List<EduTeacher> select(EduTeacher eduTeacher) {
        return null;
    }

    @Override
    public EduTeacher getById(int id) {
        return eduTeacherMapper.selectByPrimaryKey(id);
    }
}
